package com.cx.thread.message;

import java.util.LinkedList;

/**
 * @author zhangshuai
 * @version V1.0
 * @Project Java2_26
 * @Package com.cx.thread.message
 * @Description:
 * @Date 2025/5/26 16:49
 */

public class QueueTest {

    public static void main(String[] args) {

        LinkedList<String> buffer = new LinkedList<>();
        //创建2个生产者，1个消费者
        new ProducerThread(new Producer("zs",buffer)).start();
        new ProducerThread(new Producer("ls1",buffer)).start();
        new ProducerThread(new Producer("ls2",buffer)).start();
        new ProducerThread(new Producer("ls3",buffer)).start();
        new ProducerThread(new Producer("ls4",buffer)).start();
        new ProducerThread(new Producer("ls5",buffer)).start();

        new CustomThread(new Custom("ww1",buffer)).start();
        new CustomThread(new Custom("ww2",buffer)).start();
        new CustomThread(new Custom("ww3",buffer)).start();
        new CustomThread(new Custom("ww4",buffer)).start();
        new CustomThread(new Custom("ww5",buffer)).start();
        new CustomThread(new Custom("ww6",buffer)).start();
    }
}